package com.lovo.model.DTO;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * Description:
 *
 * @author LiuChengQi
 * @date Created on 2020/11/25
 */
@Data
@NoArgsConstructor
public class StudentDTO implements Serializable {

    private Long stuID;
    @ApiModelProperty(value = "学生名" ,required = true,example = "张飞")
    @NotBlank
    private String stuName;
    @ApiModelProperty(value = "学生年龄", required = true,example = "25")
    @NotNull

    private Integer stuAge;


    public StudentDTO(String stuName, Integer stuAge) {
        this.stuName = stuName;
        this.stuAge = stuAge;
    }

    public StudentDTO(Long stuID) {
        this.stuID = stuID;
    }

}
